package com.example.nutritionmanager.api

import com.example.nutritionmanager.bodys.requestBodys.Record
import com.example.nutritionmanager.bodys.responseBodys.Nutrition
import com.example.nutritionmanager.bodys.responseBodys.NutritionAmount
import retrofit2.Response
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query

interface NutritionService {
    @GET("nutrition/all")
    suspend fun getAllNutritions(): Response<List<Nutrition>>

    @GET("nutrition/getNutritionAmountByDate")
    suspend fun getNutritionAmountByDate(@Query("date") date: String): Response<List<NutritionAmount>>

    @POST("record/add")
    suspend fun addNutritionRecord(@Body record: Record): Response<Boolean>
}
